import Vuex from "vuex";
import Vue from 'vue'
//需要使用插件一次
Vue.use(Vuex);
import home from './home/index'
import search from './serch/index'
import datial from "./datial/datial";
import shoppingcart from './shopcart/shopcart'
import register from './register/register'
import pay from './pay/pay'
//处理逻辑
// const actions = {
// adda(store,value){
//     store.commit('ADDA',store.state.a + 1)
// }
// }
//修改state的优选手段
// const mutations ={
// ADDA(state,value){
//     state.a = value
//     }
// }
//仓库存储数据
// const state = {
//     a:12
// }
//计算属性

//向外暴漏vuex
export default new Vuex.Store({
    modules:{//开启模块化开发
        home,search,datial,shoppingcart,register,pay
    }
})